package com.ruoyi.web.core.config;

import com.ruoyi.system.service.ICommonService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.stereotype.Component;

/**
 * @author chmj
 * @version V1.0
 * @Package com.ruoyi.web.core.config
 * @Copyright 2022/7/26 11:47 汇博医疗股份有限公司
 */
@Slf4j
@Component
public class ApplicationClosedEventListener implements ApplicationListener<ContextClosedEvent> {

    @Autowired
    private ICommonService commonService;

    @Override
    public void onApplicationEvent(ContextClosedEvent event) {
        log.info("程序已停止");
    }
}
